﻿using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Modularity;
using Microsoft.Extensions.DependencyInjection;
using Joy.Erp.BasicArchives;
using Joy.Erp.Ufida.Core;

namespace Joy.Erp.Ufida
{
    [DependsOn(
        typeof(BasicArchivesApplicationContractsModule),
        typeof(AbpAspNetCoreMvcModule),
        typeof(UfidaApplicationContractsModule),
        typeof(BasicArchivesHttpApiModule)
        )]
    public class UfidaHttpApiModule : AbpModule
    {
        public override void PreConfigureServices(ServiceConfigurationContext context)
        {
            PreConfigure<IMvcBuilder>(mvcBuilder =>
            {
                mvcBuilder.AddApplicationPartIfNotExists(typeof(UfidaHttpApiModule).Assembly);
            });
        }

        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            context.Services.AddScoped<CreateByIdExceptionFilter>();
        }
    }
}
